<?php

/**
 * Description of CheckinModelclass
 *
 * @author Mike Gao
 */
class LandlordModel extends CommonModel {
    public $_validate	=	array(
		//array('account','/^[a-z]\w{3,}$/i','帐号格式错误'),
		array('room_id','require','房间必须填写！'),
                array('money','require','租金必须填写！'),
		array('pay_time','require','交租时间必须填写！'),
		array('real_paytime','require','实际交租时间必须填写！'),
		);

    protected $_auto = array(
        array('create_time','time',1,'function'),
        array('update_time','time',3,'function'),
        array('pay_time','strtotime',3,'function'),
        array('real_paytime','strtotime',3,'function'),
        array('alert_time','convertotime',3,'callback'),
    );

	protected function convertotime(){
        return empty($_POST['alert_time'])?0:strtotime( $_POST['alert_time'] );
	}
}
?>
